package com.gylang.auth.message;

import com.gylang.common.model.log.SysLogMq;
import com.gylang.common.model.log.SysLoginLogMq;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author gylang,
 * @data 2019/12/4 14:39,
 * @DESC
 */
@Component
public class LogMessage {


    @Autowired
    private AmqpTemplate amqpTemplate;

    public void sysLog(SysLogMq sysLogMq) {
        amqpTemplate.convertAndSend("sys_log", sysLogMq);
    }

    public void sysLoginLog(SysLoginLogMq sysLoginLogMq) {
        amqpTemplate.convertAndSend("sys_login_log", sysLoginLogMq);
    }

}
